export const code = `import React, { useState, forwardRef } from "react";
import CodeDisplayPage from "../../components/CodePreview";
import { Button, Checkbox, Col, Row } from "antd";
import useFetch from "./myCompare";
import {code} from "./utils"; 
// 使用
function UserList() {
  const [datalist, setDatalist] = useState({ name: 1, age: 2 });
  const { data } = useFetch(datalist);

  const handleClick = async () => {
    const obj = { name: datalist.name + 1, age: datalist.age + 1 };
    setDatalist(obj);
  };
  return (
    <div>
      <Button onClick={handleClick}>请求测试</Button>
      <div>{data}</div>
      <CodeDisplayPage code={code} language={"tsx"} />
    </div>
  );
}
export default UserList;
`;
